# coding: utf-8
'''
Created on 25 avr. 2011

@author: shin
'''

class DaoElement():
    '''
    stub DaoElement
    pour avoir la liste des compétences
    '''

    def __init__(self, type, race):
        '''
        Constructor
        ''' 
        self.objet = ""
        self.type = ""
        self.hauteur = 0
        self.constitution = 0
        self.taille = 0
        self.degats = 0
        self.franchissable = True
        self.joueur = 0
        self.endurance = 0
        self.intelligence = 0
        self.energie = 0
        self.cible = ""
        self.competence = {"Mouvement"      : 1,
                           "Passe son tour" : 1 }
        self.nom = ""
        
        if (type == "Guerrier" and race == "Nain"):
            self.objet = "Personnage"
            self.type = "Vivant"
            self.hauteur = 0
            self.constitution = 8
            self.taille = 1.2
            self.degats = 5
            self.franchissable = False
            self.joueur = 1
            self.endurance = 7
            self.intelligence = 7
            self.energie = 100
            self.cible = ""
            self.competence["Frappe"]       = 1
            self.competence["Brise Genoux"] = 1
            self.nom = "Rankor"

        if (type == "Archer" and race == "Elfe"):
            self.objet = "Personnage"
            self.type = "Vivant"
            self.hauteur = 0
            self.constitution = 5
            self.taille = 2.0
            self.degats = 3
            self.franchissable = False
            self.joueur = 1
            self.endurance = 9
            self.intelligence = 10
            self.energie = 120
            self.cible = ""
            self.competence["Tir"]    = 1
            self.competence["Soigne"] = 1
            self.nom = "Shu"

        if (type == "Mage" and race == "Mort-Vivant"):
            self.objet = "Personnage"
            self.type = "Mort-Vivant"
            self.hauteur = 0
            self.constitution = 9
            self.taille = 1.7
            self.degats = 4
            self.franchissable = False
            self.joueur = 2
            self.endurance = 6
            self.intelligence = 5
            self.energie = 80
            self.cible = ""
            self.competence["Shadow Bolt"] = 1
            self.competence["Ressucite"]   = 1
            self.nom = "Asura"

        if (type == "DeathKnight" and race == "BloodElfe"):
            self.objet = "Personnage"
            self.type = "Vivant"
            self.hauteur = 0
            self.constitution = 8
            self.taille = 1.6
            self.degats = 4
            self.franchissable = False
            self.joueur = 2
            self.endurance = 7
            self.intelligence = 7
            self.energie = 120
            self.cible = ""
            
            self.competence["Frappe"]    = 1
            self.competence["Seduction"] = 1
            
            self.nom = "Mantas"

        if (type == "Terrain" and race == "Eau"):
            self.objet = "Element"
            self.type = "Eau"
            self.franchissable = False

        if (type == "Terrain" and race == "Herbe"):
            self.objet = "Element"
            self.type = "Herbe"

        if (type == "Terrain" and race == "Sable"):
            self.objet = "Element"
            self.type = "Sable"

        if (type == "Terrain" and race == "Rocher"):
            self.objet = "Element"
            self.type = "Rocher"
            self.franchissable = False

        if (type == "Terrain" and race == "Neige"):
            self.objet = "Element"
            self.type = "Neige"
            
        if (type == "Terrain" and race == "Glace"):
            self.objet = "Element"
            self.type = "Glace"
            self.franchissable = False

        if (type == "Terrain" and race == "Arbre"):
            self.objet = "Element"
            self.type = "Arbre"
            self.franchissable = False